<?php 
$controller = $this->getController()->id;
echo CHtml::openTag('ul', array('class'=>'ul'));
echo CHtml::tag('li', array('id'=>'logo','class'=>'float-left'),CHtml::link(null,Yii::app()->createUrl('/')));
?>
<li class="float-left menu navi-copy">
	<a  href=<?=Yii::app()->createUrl('/copy')?> >
		<span class="left-border float-left"></span>
		<span class="right-border float-right"></span>
		<?echo Yii::t('default', 'socialads')?>
	</a>
</li>
<li class="float-left menu navi-adv">
	<a href=<?=Yii::app()->createUrl('/adv')?> >
		<span class="left-border float-left"></span>
		<span class="right-border float-right"></span>
		<?echo Yii::t('default', 'advertisers')?>
	</a>
</li>
<?
if(Yii::app()->user->isGuest){
	echo CHtml::tag('li', array('class'=>'userAction float-right'),CHtml::link(Yii::t('default','login'),Yii::app()->createUrl('/users/login')));
	echo CHtml::tag('li', array('class'=>'userAction float-right'),CHtml::link(Yii::t('default','join'),Yii::app()->createUrl('/users/join')));
}else{
?>
<li style="position: relative;" class="float-right">
	<div class="inline-block over-hidden box">
		<a class="userImage float-left" href="<?=Yii::app()->createUrl('/users/setting')?>">
			<img style="width: 30px; height: 30px;" alt="userImage" src="https://adbyme-w.s3.amazonaws.com/thumbs/User/5213.30x30.crop.png">
		</a>
		<p class="username float-left"><?=Yii::app()->user->name?></p>
		<a id="menuBtn" class="float-left" href="<?=Yii::app()->createUrl('/users/setting')?>">
			<span class="arrow"></span>
		</a>
	</div>
	<ul  id="dropMenu" style="display: none;">
		<li><a href="<?=Yii::app()->createUrl('/users/setting')?>"><?=Yii::t('default', 'setting')?></a></li>
		<hr class="mg-h-5">
		<li><a href="<?=Yii::app()->createUrl('/copy/slogans')?>">My slogans</a></li>
		<li><a href="<?=Yii::app()->createUrl('/adv/ads')?>">My Campaigns</a></li>
		<hr class="mg-h-5">
		<li><a href="<?=Yii::app()->createUrl('/users/logout')?>"><?=Yii::t('default', 'logout')?></a></li>
	</ul>
</li>
<?}
echo CHtml::closeTag('ul')
?>

